package com.application.lucky.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.application.lucky.R;
import com.application.lucky.manager.UserManagers;
import com.application.lucky.widget.TitlebarView;
import com.application.mylibrary.base.BaseActivity;

public class AccountSecurityActivity extends BaseActivity {

    private TitlebarView mTitleBar;
//    private TextView mTvSetPassword;
    private TextView mTvSetPayPassword;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        initView();
    }

    @Override
    public void beforeInit() {

    }

    @Override
    public int getLayoutId() {
        return R.layout.activity_account_security;
    }

    private void initView() {
        mTitleBar = (TitlebarView) findViewById(R.id.title_bar);
//        mTvSetPassword = (TextView) findViewById(R.id.tv_set_password);
        mTvSetPayPassword = (TextView) findViewById(R.id.tv_set_pay_password);
        mTitleBar.setOnViewClick(new TitlebarView.onViewClick() {
            @Override
            public void leftClick() {
                finishAnim();
            }

            @Override
            public void rightClick() {

            }
        });
//        if (UserManagers.getInstance().isSetPayPW()) {
//            mTvSetPassword.setVisibility(View.GONE);
//        }
//        mTvSetPassword.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//                startActivityAnim(new Intent(AccountSecurityActivity.this, SetPayPawwordActivity.class));
//            }
//        });
        mTvSetPayPassword.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivityAnim(new Intent(AccountSecurityActivity.this, SetPayPawwordActivity.class));
            }
        });
        UserManagers.getInstance().loadPayPw();
    }
}
